﻿<Window x:Class="OneFunction.Windows.SettingsApp"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:OneFunction.Windows"
        mc:Ignorable="d"
        Title="Настройки соединения" Height="350" Width="300"
        WindowStartupLocation="CenterScreen"
        WindowStyle="ToolWindow"
        Background="LightYellow"
        MinHeight="350" MinWidth="300"
        MaxHeight="350" MaxWidth="300"
        Closing="Window_Closing">
    <Grid>
        <StackPanel VerticalAlignment="Center">
            <Label Content="Адрес сервера:"
                   x:Name="textHost"/>
            <TextBox x:Name="host"
                     TextChanged="host_TextChanged"/>
            
            <Label Content="Название БД:"/>
            <TextBox x:Name="database"
                     TextChanged="database_TextChanged"/>

            <Label Content="Логин:"/>
            <TextBox x:Name="login"
                     TextChanged="login_TextChanged"/>
            
            <Label Content="Пароль:"/>
            <TextBox x:Name="password"
                     TextChanged="password_TextChanged"/>

            <Button Content="Проверить подключение"
                    Margin="5 15"
                    Click="checkConnect"/>
            <Button Content="Сохранить настройки"
                    Margin="5"
                    Click="saveSettings"/>
        </StackPanel>
    </Grid>
</Window>
